package com.wdd.myplatform.consumerservice.feign;


import com.wdd.commmon.providerservice.entity.SysUser;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "provider-service")
@Service
@RefreshScope()
public interface SysUserFeignService {

    @GetMapping("/goods/{goodsId}")
    SysUser getById(@PathVariable("goodsId") String goodsId);

    @GetMapping("/getByUserName")
    @ApiOperation("getByUserName")
    SysUser getByUserName(
        @ApiParam(name = "userName",required = true) @RequestParam(value = "userName",required = true) String userName);

}
